from aiogram_dialog import DialogManager

from dc_shop.database.services.delivery_zone import DeliveryZoneService


async def delivery_zones_getter(dialog_manager: DialogManager, **kwargs):
    delivery_zone_service: DeliveryZoneService = dialog_manager.middleware_data.get("delivery_zone_service")
    delivery_zones = await delivery_zone_service.get_all_delivery_zones()

    return {
        "delivery_zones": delivery_zones,
    }
